<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>弹性布局-常用属性-flex-shrink</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 500px;
            height: 600px;
            border: 1px solid #ccc;
            margin: 100px auto;
            box-sizing: border-box;
            /* 设置父容器为伸缩盒子*/
            display: flex;
            justify-content: space-around;
        }

        .first {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            /* 定义收缩比例
                通过设置的值来计算收缩空间
                比例值的计算：当前空间的 flex-shrink/所有兄弟子元素的flex-shrink 的和
                默认值为 1
            */
            flex-shrink: 1;
        }

        .second {
            width: 200px;
            height: 200px;
            background-color: pink;
            flex-shrink: 0;
        }

        .third {
            width: 200px;
            height: 200px;
            background-color: green;
            flex-shrink: 0;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="first">1</div>
        <div class="second">2</div>
        <div class="third">3</div>
    </div>
</body>
</html>